<?php
/**
 * 后台首页
 */
namespace Admin\Controller;

use Common\Controller\AdminbaseController;

class BiaoqianController extends AdminbaseController {


    //职业标签添加
     function zhiye_biaoqian(){
         if($_POST){
             $data["type"] = 1;
             $data["is_del"] = 0;
             $data["lable"] = I("name");
             $data["ctime"] = time();
             M("geren_lable")->add($data);//返回的就是一个ID
             $this->success("添加成功",U("Biaoqian/zhiye_biaoqian"));
         }else{
             $data = M("geren_lable")->where("type = 1 and is_del=0")->select();
             $this->assign("data",$data);
             $this -> display();
         }
     }
   //职业标签删除
    function zhiye_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
            if($cha['is_del']==0){
                $aa['is_del']=1;
            }
         $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/zhiye_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }
    //类型标签添加
    function type_biaoqian(){
        if($_POST){
            $data["type"] = 2;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/type_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 2 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //类型标签删除
    function type_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/type_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }
    //特长标签添加
    function techang_biaoqian(){
        if($_POST){
            $data["type"] = 3;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/techang_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 3 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //特长标签删除
    function techang_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/techang_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }


   //风格标签添加
    function fengge_biaoqian(){
        if($_POST){
            $data["type"] = 4;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/fengge_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 4 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //风格标签删除
    function fengge_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/fengge_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }
    //外貌标签添加
    function waimao_biaoqian(){
        if($_POST){
            $data["type"] = 5;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/waimao_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 5 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //外貌标签删除
    function waimao_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/waimao_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }

    //体型标签添加
    function tixing_biaoqian(){
        if($_POST){
            $data["type"] = 6;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/tixing_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 6 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //体型标签删除
    function tixing_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/tixing_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }

  //魅力部位标签添加
    function meilibuwei_biaoqian(){
        if($_POST){
            $data["type"] = 7;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("geren_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/meilibuwei_biaoqian"));
        }else{
            $data = M("geren_lable")->where("type = 7 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //魅力部位标签删除
    function meilibuwei_biaoqian_delete(){
        $id = I("id");
        $cha = M("geren_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("geren_lable")->where("id=$id")->save($aa);
        if($gai){
            $this->success("删除成功",U("Biaoqian/meilibuwei_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }





    //自荐标签添加
    function cover_biaoqian(){
        if($_POST){
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("cover_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/cover_biaoqian"));
        }else{
            $data = M("cover_lable")->where("is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //自荐标签删除
    function cover_biaoqian_delete(){
        $id = I("id");
        $cha = M("cover_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("cover_lable")->where("id=$id")->save($aa);

        if($gai){
            $this->success("删除成功",U("Biaoqian/cover_biaoqian"));
        }else{
            $this->error("删除失败");
        }
    }


    //影视表演标签添加
    function yingshibiaoyan_lable(){
        if($_POST){
            $data["type"] = 1;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("tonggao_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/yingshibiaoyan_lable"));
        }else{
            $data = M("tonggao_lable")->where("type = 1 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //影视表演标签删除
    function yingshibiaoyan_lable_delete(){
        $id = I("id");
        $cha = M("tonggao_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("tonggao_lable")->where("id=$id")->save($aa);

        if($gai){
            $this->success("删除成功",U("Biaoqian/yingshibiaoyan_lable"));
        }else{
            $this->error("删除失败");
        }
    }
    //平面拍摄标签添加
    function pingmianpaishe_lable(){
        if($_POST){
            $data["type"] = 2;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("tonggao_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/pingmianpaishe_lable"));
        }else{
            $data = M("tonggao_lable")->where("type = 2 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //平面拍摄标签删除
    function pingmianpaishe_lable_delete(){
        $id = I("id");
        $cha = M("tonggao_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("tonggao_lable")->where("id=$id")->save($aa);

        if($gai){
            $this->success("删除成功",U("Biaoqian/pingmianpaishe_lable"));
        }else{
            $this->error("删除失败");
        }
    }
    //会展活动标签添加
    function huizhanhuodong_lable(){
        if($_POST){
            $data["type"] = 3;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("tonggao_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/huizhanhuodong_lable"));
        }else{
            $data = M("tonggao_lable")->where("type = 3 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //会展活动标签删除
    function huizhanhuodong_lable_delete(){
        $id = I("id");
        $cha = M("tonggao_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("tonggao_lable")->where("id=$id")->save($aa);

        if($gai){
            $this->success("删除成功",U("Biaoqian/huizhanhuodong_lable"));
        }else{
            $this->error("删除失败");
        }
    }
    //网络宣传标签添加
    function wangluoxuanchuan_lable(){
        if($_POST){
            $data["type"] = 4;
            $data["is_del"] = 0;
            $data["lable"] = I("name");
            $data["ctime"] = time();
            M("tonggao_lable")->add($data);//返回的就是一个ID
            $this->success("添加成功",U("Biaoqian/wangluoxuanchuan_lable"));
        }else{
            $data = M("tonggao_lable")->where("type = 4 and is_del=0")->select();
            $this->assign("data",$data);
            $this -> display();
        }
    }
    //网络宣传标签删除
    function wangluoxuanchuan_lable_delete(){
        $id = I("id");
        $cha = M("tonggao_lable")->where("id=$id")->find();
        if($cha['is_del']==0){
            $aa['is_del']=1;
        }
        $gai = M("tonggao_lable")->where("id=$id")->save($aa);

        if($gai){
            $this->success("删除成功",U("Biaoqian/wangluoxuanchuan_lable"));
        }else{
            $this->error("删除失败");
        }
    }









}

